Spring Boot 3.0 Cookbook: Proven Recipes for Building Modern and Robust Java Web Applications With Spring Boot by Felip Miguel Puig
Author:Felip Miguel Puig [Puig, Felip Miguel]
Language: eng
Format: epub
Tags: Computers, Languages, Java, Internet, Web Programming, Web Services & APIs
ISBN: 9781835084908
Google: F_AOEQAAQBAJ
Publisher: Packt Publishing Ltd
Published: 2024-07-11T22:00:00+00:00
Figure 5.3: List of tables in recently in the database created by Flyway.
The database now has the tables necessary to manage our application.
Letâs create a migration for our application now. We need to manage football matches in our application, and we need to know the height and weight of the players.The matches will be managed in a new Entity named MatchEntity. It will have two fields referencing the teams playing the match, the match date, and the goals scored by each team. It should look like this: @Entity @Table(name = "matches") public class MatchEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private LocalDate matchDate; @ManyToOne @JoinColumn(name = "team1_id", nullable = false) private TeamEntity team1; @ManyToOne @JoinColumn(name = "team2_id", nullable = false) private TeamEntity team2; @Column(name = "team1_goals", columnDefinition = "integer default 0") private Integer team1Goals; @Column(name = "team2_goals", columnDefinition = "integer default 0") private Integer team2Goals; }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Content Management | Programming |
User Experience & Usability | User Generated Content |
Web Design | Web Marketing |
Web Services | Website Analytics |
Hello! Python by Anthony Briggs(9620)
The Mikado Method by Ola Ellnestam Daniel Brolund(9525)
Dependency Injection in .NET by Mark Seemann(9069)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7582)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7308)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6374)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6202)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5638)
Svelte with Test-Driven Development by Daniel Irvine(5435)
Test-Driven Development with PHP 8 by Rainier Sarabia(5052)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(5045)
Kotlin in Action by Dmitry Jemerov(4843)
Web Development with Django by Ben Shaw Saurabh Badhwar(4482)
Audition by Ryu Murakami(4330)
React Application Architecture for Production by Alan Alickovic(4197)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4167)
Functional Programming in JavaScript by Mantyla Dan(3873)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(3491)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(3403)